package com.qingcheng.dao;

import com.qingcheng.pojo.order.Preferential;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

public interface PreferentialMapper extends Mapper<Preferential> {

    @Select("SELECT\n" +
            "\t* \n" +
            "FROM\n" +
            "\ttb_preferential \n" +
            "WHERE\n" +
            "\tstart_time >= #{stateTime}\n" +
            "\t\n" +
            "\tAND end_time <= #{endTime}\n" +
            "\t\n" +
            "ORDER BY\n" +
            "\tbuy_money DESC")
    public List<Preferential> selectByDate(Date stateTime, Date endTime);
}
